import { stringify } from 'qs';
import request from '@/utils/request';

export async function queryTag(params) {
  return request(`/api/tag?${stringify(params)}`);
}


export async function removeTag(params) {
  return request('/api/tag', {
    method: 'POST',
    body: {
      ...params,
      method: 'delete',
    },
  });
}

export async function addTag(params) {
  return request('/api/tag', {
    method: 'POST',
    body: {
      ...params,
      method: 'post',
    },
  });
}

export async function updateTag(params) {
  return request('/api/tag', {
    method: 'POST',
    body: {
      ...params,
      method: 'update',
    },
  });
}

